<template>
  <div>
    <div class="InviteFriends_die">
      <div></div>
      <div>
        <div>
          <img
            :src="nameheader?nameheader:'http://www.zhaoshengku.net/wx-%E6%A4%AD%E5%9C%86%201.png'"
            alt
            mode="aspectFill"
            @click="imgLong"
          />
        </div>
        <div>
          <img :src="'https://api.zhaoshengku.net/api/data/getqrcode?id='+id" alt />
          <div></div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      nameheader: "",
      img: "",
      id: -1
    };
  },
  onLoad() {
    this.nameheader = this.$store.state.myxinxi.info_avatar;
    this.id = this.$store.state.myxinxi.info_member_id;
  },
  methods: {
    imgLong() {
      var _this = this;

      var url = "https://api.zhaoshengku.net/api/data/getqrcode?id=" + _this.id;
      // var urls = "https://api.zhaoshengku.net/api/data/getqrcode?id="+_this.id;
      wx.previewImage({
        current: url, // 当前显示图片的http链接
        urls: [url] // 需要预览的图片http链接列表
      });
    }
  }
};
</script>

<style scoped>
.InviteFriends_die > div:nth-child(1) {
  width: 100%;
  height: 10rpx;
  background: #dddddd;
}
.InviteFriends_die > div:nth-child(2) {
  width: 100%;
  padding-top: 20rpx;
  text-align: center;
}
.InviteFriends_die > div:nth-child(2) > div:nth-child(1) {
  position: relative;
}
.InviteFriends_die > div:nth-child(2) > div:nth-child(1) > img {
  width: 136rpx;
  height: 136rpx;
  border-radius: 50%;
  position: absolute;
  left: 305rpx;
  bottom: -150rpx;
  z-index: 222;
}
.InviteFriends_die > div:nth-child(2) > div:nth-child(2) {
  width: 471rpx;
  padding-top: 57rpx;
  padding-left: 44rpx;
  padding-right: 44rpx;
  margin: 0 auto;
  border: 1px solid rgba(229, 229, 229, 1);
  box-sizing: border-box;
  margin-top: 80rpx;
}
.InviteFriends_die > div:nth-child(2) > div:nth-child(2) > img {
  width: 368rpx;
  height: 368rpx;
}
.InviteFriends_die > div:nth-child(2) > div:nth-child(2) > div {
  font-size: 28rpx;
  font-weight: 500;
  color: rgba(1, 105, 234, 1);
  height: 80rpx;
  line-height: 80rpx;
}
</style>
